<?php
$link =  mysqli_connect("localhost","root","root","2113");
$user=$_GET["user"];
$message=$_GET["message"];
$sql = "INSERT INTO messages (user,messager) VALUES ('$user','$message')";
$res =  mysqli_query($link,$sql);
if( mysqli_affected_rows($link)){  //查看sql是否有影响的行数；
	$info['status'] = 1;
	$info['data'] = "添加成功";
}else{
	// echo "添加失败";
	$info['status'] = 0;
	$info['data'] = "添加失败";
}
echo json_encode($_GET);
?>